<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="easyui/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="easyui/themes/icon.css">
	<link rel="stylesheet" type="text/css" href="easyui/demo.css">
	<script type="text/javascript" src="easyui/jquery.min.js"></script>
	<script type="text/javascript" src="easyui/jquery.easyui.min.js"></script>
		
<link rel="stylesheet" type="text/css" href="js/codebase/GooFlow.css"/>
<script type="text/javascript" src="js/demo/child.js"></script>
<script type="text/javascript" src="js/plugin/jquery.min.js"></script>
<script type="text/javascript" src="js/codebase/GooFunc.js"></script>
<script type="text/javascript" src="js/plugin/json2.js"></script>
<link rel="stylesheet" type="text/css" href="js/demo/default.css"/>
<script type="text/javascript" src="js/codebase/GooFlow.js"></script>
<script type="text/javascript">
var property={
	width:1200,  
	height:600,
	toolBtns:["start round","end","task","node","chat","state","plug","join","fork","complex mix"],
	haveHead:true,
	headBtns:["open","save","undo","redo","reload"],//如果haveHead=true，则定义HEAD区的按钮
	haveTool:true,
	haveGroup:true,
	useOperStack:true
};
var remark={
	cursor:"指针",
	direct:"转换连线",
	start:"开始结点",
	"end round":"结束结点",
	"task round":"任务结点",
	node:"自动结点",
	chat:"决策结点",
	state:"状态结点",
	plug:"附加插件",
	fork:"分支结点",
	"join":"联合结点",
	"complex mix":"复合结点",
	group:"组织划分框编辑开关"
};
var demo;
$(document).ready(function(){
	demo=$.createGooFlow($("#demo"),property);
	demo.setNodeRemarks(remark);
	//demo.onItemDel=function(id,type){
	//	return confirm("确定要删除该单元吗?");
	//}
	
	demo.editable = "false"
	demo.loadData(jsondata);
	//重写 onBtnSaveClick方法
	demo.onBtnSaveClick = function () {
		 this.clearData();		 
	}	 		
});
 
var out;

function Export(){
    document.getElementById("result").value=JSON.stringify(demo.exportData());
    demo.clearData();
}
</script>

</head>
<body>
<div id="demo" style="margin:10px"></div>
<input id="submit" type="button" value='导出结果' onclick="Export()"/>
<textarea id="result" row="6"></textarea>


</body>



 


</html>